<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <title>标签管理</title>
    <script type="text/javascript" src="http://localhost/cms_edu/Static/Js/jquery-1.7.2.min.js"></script>
    <link rel="stylesheet" href="http://localhost/cms_edu/Static/hdjs/hdjs.css" />
    <link rel="stylesheet" href="http://localhost/cms_edu/Static/bootstrap/css/bootstrap.min.css" />
    <script type="text/javascript" src="http://localhost/cms_edu/Static/hdjs/hdjs.min.js"></script>

    <style type="text/css">
        /*修改按钮*/
       .table2 tr td{
            height: 35px;
        }
        input[type="text"]{
            background-color: #FFFFFF;
            border: 2px solid #DDDDDD;
            border-radius: 0;
            box-shadow: 2px 2px 2px #F0F0F0 inset !important;
            color: #555555;
            display: inline-block;
            font-size: 12px;
            line-height: 30px;
            margin: 0;
            padding: 0 6px;
            vertical-align: middle;
            height: 30px;
        }
        input[type="text"]:focus{
            background: none repeat scroll 0 0 #FFFBDE;
            border: 2px solid #51B4FF;
            box-shadow: none !important;
            outline: 1px solid #51B4FF;
        }
    </style>

    <script type="text/javascript" src="./js/js.js"></script>
</head>
<body>
<div class="wrap">
    <table class="hd-table hd-table-list">
        <thead>
        <tr>
            <td width="30">id</td>
            <td>标签名</td>
            <td width="200">操作</td>
        </tr>
        </thead>
        <tbody>
        <?php foreach ($data as $k=>$v){?>
            <tr>
                <td width="30"><?php echo $v['tid'];?></td>
                <td><?php echo $v['tagname'];?></td>
                <td width="200">
                <a href="<?php echo U('Tag/edit',array('tid'=>$v['tid']));?>" class="hd-btn hd-btn-primary hd-btn-sm">修改</a>
               <!--  <a href="<?php echo U('Tag/del',array('tid'=>$v['tid']));?>" class="hd-btn hd-btn-danger hd-btn-sm">删除</a> -->
               <a href="javascript:hd_modal_del(<?php echo $v['tid'];?>);" class="hd-btn hd-btn-danger hd-btn-sm">删除</a>
                </td>
            </tr>
            <?php }?>
        </tbody>
    </table>
    <div class="page_hdjob">
        <?php echo $page;?>
    </div>
</div>
</body>
<script type="text/javascript">
    function hd_modal_del(id) {
        hd_modal({
            width: 400,//宽度
            height: 150,//高度
            title: '确认删除吗？',//标题
            content: '',//提示信息
            button: true,//显示按钮
            button_success: "确定",//确定按钮文字
            button_cancel: "取消",//关闭按钮文字
            timeout: 0,//自动关闭时间 0：不自动关闭
            shade: true,//背景遮罩
            shadeOpacity: 0.4,//背景透明度
            success: function () {//点击确定后的事件
                location.href = "http://localhost/cms_edu/index.php/Admin/Tag" + '&a=del&tid=' + id;
            },
            cancel: function () {//点击关闭后的事件
                
            }
        });
    }
</script>
</html>


